<?php
	//学院
	function selectAllcolleges(){
		$conn = mysqli_connect("localhost:3306","mebin","171110301cwb","SMS");
		$sql = 	" select " .
				" 	collegeid,collegename " .
				" from " .
				" 	college " ;
		$result = mysqli_query($conn, $sql);
		$colleges = [];
		while($college = mysqli_fetch_assoc($result)){
			$colleges[] = $college;
		}
		mysqli_close($conn);
		return $colleges;
	}
?>